<template>
	<view >
		<swiper @change="into" style="width: 100%; height: 100vh;" class="banner" indicator-dots="true"  :autoplay="false" :interval="3000" :duration="1000" indicator-color="rgba(255,255,255,.4)" indicator-active-color="rgba(255,255,255,.8)">
					<swiper-item v-for="(item,index) in imglist" :key="index">
						<view  class="swiper-item">
							<image style="width: 100%;" :src="item" mode="widthFix"></image>
						</view>
					</swiper-item>
					
		</swiper>
		<view class="text" v-if="number==4">
			<navigator class="textip" url="/pages/setip/setip">设置ip</navigator>
			
			
		</view>
		<view class="" v-if="number==4" style="display: flex;margin-top: 100px;justify-content: center;">
			<view @click="login" class="textad">立即体验</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				number:0,
				imglist:[
					"../../static/splash/splash1.jpg",
					"../../static/splash/splash2.jpg",
					"../../static/splash/splash3.jpg",
					"../../static/splash/splash4.jpg",
					"../../static/splash/splash5.jpg"
				]
				
			}
		},
		methods: {
			into(res){
				console.log(res)
				this.number=res.detail.current
				console.log(this.number)
			},
			login(){
				uni.navigateTo({
					url:'/pages/login/login'
				})
			}
			
		}
	}
</script>

<style>
	.textip{
		position: absolute;
		top: 30px;
		font-size: 32px;
		color: blue;
		right: 30px;
		text-align: right;
	}
	.textad{
		position: absolute; 
		font-size: 30px;
		color: aqua;
		/* margin: 10px auto; */
		left: 40%;
		top: 70%;
		
	}
	.intro{
		width: 100%;
		height: 100vh;
	}

</style>
